package net.lzzy.repository;

import net.lzzy.entity.Comment;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Modifying;
import org.springframework.data.jpa.repository.Query;

import javax.transaction.Transactional;

public interface CommentRepository extends JpaRepository<Comment, Integer> {


    @Query(value = "UPDATE t_comment SET content=?2 where id=?1", nativeQuery = true)
    @Modifying
    @Transactional
    public int updateComment(Integer Id, String content);

}
